package com.study.proxy.cglib;

import net.sf.cglib.proxy.MethodInterceptor;
import net.sf.cglib.proxy.MethodProxy;

import java.lang.reflect.Method;

/**
 *
 */
public class CglibBugHouseProxy implements MethodInterceptor {


	@Override
	public Object intercept(Object obj, Method method, Object[] args, MethodProxy proxy) throws Throwable {
		System.out.println("买房前准备");
		Object result = proxy.invokeSuper(obj, args);
		 System.out.println("买房后装修");
		return result;
	}
}
